<?php
// +----------------------------------------------------------------------
// | zhanshop-proxy / IndexEvnet.php    [ 2023/12/4 21:17 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2023 zhangqiquan All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangqiquan <768617998@qq.com>
// +----------------------------------------------------------------------
declare (strict_types=1);

namespace app\api\admin;
use app\library\AdCallQueue;
use app\library\AdshowCallQueue;
use Swoole\Http\Request;
use Swoole\Http\Response;
use zhanshop\App;
use zhanshop\server\Event;

class AdminEvent extends Event {

    public string $servName = 'admin';

    public function onWorkerStart($server, $workerId) :void{
        parent::onWorkerStart($server, $workerId);

        App::make(AdshowCallQueue::class); // 广告展示监测写入队列
        App::make(AdCallQueue::class); // 广告监测写入队列
    }
    /**
     * @param Request $request
     * @param Response $response
     * @return void
     */
    public function onRequest($request, $response) :void{
        parent::onRequest($request, $response);
    }
}